﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/External.Master" Inherits="System.Web.Mvc.ViewPage<BPM.ViewModel.RegisterViewModel>" %>

<asp:Content ID="Title" ContentPlaceHolderID="TitleContent" runat="server">
    申请帐号
</asp:Content>
<asp:Content ID="Style" ContentPlaceHolderID="ScriptStyleContent" runat="server">
    <link href="../../Content/Styles/ExternalSite.css" type="text/css" rel="Stylesheet" />
    <link href="../../Content/Styles/Register/Register.css" type="text/css" rel="Stylesheet" />
    <script type="text/javascript">
        $(document).ready(function () {
            //Below are used to let left td align right and right td align left, and control width for all TDs
            $("tr:lt(4) td:nth-child(1)").css({ "text-align": "right", "width": "120px" });
            $("tr:lt(4) td:nth-child(2)").css({ "text-align": "left", "width": "160px" });
            $("tr:lt(4) td:nth-child(3)").css({ "text-align": "left", "width": "220px" });

            //register Input control FocusIn event handler
            $("#tableRegister input").focus(function () {
                //clear others
                $("#tableRegister input").each(function () {
                    if ($(this).attr("name") != "validationCode") {
                        $(this).parent().next().hide();
                    }
                    $(this).parent().parent().css("background-color", "");
                });
                //register mine
                //if validationCode, don't hide third TD
                if ($(this).attr("name") != "validationCode") {
                    $(this).parent().next().show();
                }
                $(this).parent().parent().css("background-color", "#EEE");
            }).first().focus();


        });
    </script>
</asp:Content>
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       { %>
    <div class="externalRegisterMain">
        <fieldset style="width: 500px; margin-left: 250px; margin-top: 50px;">
            <legend>注册</legend>
            <table id="tableRegister" cellpadding="0" cellspacing="0" style="width: 500px;">
                <tr>
                    <td>
                        用户名:&nbsp;
                    </td>
                    <td>
                        <input type="text" name="userName" style="width: 150px;" />
                    </td>
                    <td>
                        8至16位字母,数字
                    </td>
                </tr>
                <tr>
                    <td>
                        密码:&nbsp;
                    </td>
                    <td>
                        <input type="password" name="password" style="width: 150px;" />
                    </td>
                    <td>
                        8至16位字母,数字
                    </td>
                </tr>
                <tr>
                    <td>
                        确认密码:&nbsp;
                    </td>
                    <td>
                        <input type="password" name="confirmPassword" style="width: 150px;" />
                    </td>
                    <td>
                        再次输入密码
                    </td>
                </tr>
                <tr>
                    <td>
                        真实姓名:&nbsp;
                    </td>
                    <td>
                        <input type="text" name="realName" style="width: 150px;" />
                    </td>
                    <td>
                        真实姓名
                    </td>
                </tr>
                <%--<tr>
                    <td>
                        验证码:&nbsp;
                    </td>
                    <td>
                        <input type="text" name="validationCode" style="width: 150px;" />
                    </td>
                    <td>
                        <img src="<%= Url.Content("~/images/validationCode.jpg") %>" alt="验证码" /><a href="#" onclick="return false;">换一张</a>
                    </td>
                </tr>--%>
                <% if (Model != null && !String.IsNullOrWhiteSpace(Model.Message))
                   { %>
                <tr>
                    <td colspan="3" class="validError" style="text-align: center;">
                        <%= Model.Message %>
                    </td>
                </tr>
                <% } %>
            </table>
            <div style="text-align: center; height: 30px; line-height: 30px;">
                <input type="submit" value="提交注册" />
                <input type="button" value="返回" onclick="window.location.href = '../Logon/Logon/'" />
            </div>
        </fieldset>
    </div>
    <%} %>
</asp:Content>
